package com.mes.basicdata.dao.iface;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import com.bstek.bdf2.core.model.DefaultUser;
import com.bstek.bdf2.core.model.UserDept;
import com.bstek.dorado.data.provider.Criteria;
import com.bstek.dorado.data.provider.Page;
import com.mes.basicdata.domain.Employee;
import com.mes.common.dao.iface.IBasicDao;

public interface IEmployeeDao extends IBasicDao<Employee>{

	public Collection<Employee> getByDeptId(String deptId, Page<Employee> page);
	
	/**
	 * 获取拥有某个角色的人员列表
	 * @param roleUid 角色Uid
	 * @param page
	 * @return
	 */
	public List<Employee> getEmployeesByRoleUid(String roleUid, Page<Employee> page) throws Exception;
	
	/**
	 * 获取某一个部门的检验员列表，并按照人员名称排序
	 * @param deptId
	 * @return
	 * @throws Exception
	 */
	public List<Employee> getCheckersByDeptUid(String deptUid, Criteria criteria) throws Exception;
	
	public void getEmployeeByConditions(Page<Employee> page, Map<String, Object> params) throws Exception;

	public void saveUser(DefaultUser user) throws Exception;

	public void saveUserDept(UserDept userDept) throws Exception;

	public void updateUser(DefaultUser user) throws Exception;

	public void deleteUser(DefaultUser user) throws Exception;
	
	public UserDept getUserDeptByUser(String username) throws Exception;

	void updateUserDept(UserDept userDept) throws Exception;
	
}
